import request from '@/utils/request'

// 查询消费项目配置列表
export function listConsumeConfig(query) {
  return request({
    url: '/system/consumeConfig/list',
    method: 'get',
    params: query
  })
}

//消费项目状态修改
export function changeUserStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/system/consumeConfig/changeStatus',
    method: 'put',
    data: data
  })
}


// 查询消费项目配置详细
export function getConsumeConfig(id) {
  return request({
    url: '/system/consumeConfig/' + id,
    method: 'get'
  })
}

// 新增消费项目配置
export function addConsumeConfig(data) {
  return request({
    url: '/system/consumeConfig',
    method: 'post',
    data: data
  })
}

// 修改消费项目配置
export function updateConsumeConfig(data) {
  return request({
    url: '/system/consumeConfig',
    method: 'put',
    data: data
  })
}

// 删除消费项目配置
export function delConsumeConfig(id) {
  return request({
    url: '/system/consumeConfig/' + id,
    method: 'delete'
  })
}
